package com.itheima.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;

@Configuration //表示该类是一个spring配置类, 代替applicationContext.xml配置文件
/*1.配置Spring扫描包中的注解
<context:component-scan base-package="com.itheima"/>*/
@ComponentScan("com.itheima")

/*2.引入jdbc.properties文件; 让注解可以连接到jdbc.properties文件
<context:property-placeholder location="classpath:jdbc.properties"/>*/
@PropertySource("classpath:jdbc.properties")

/*<import resource="classpath:xxxxx.xml"/>*/
//@Import({jdbcConfig.class}) //引入外置配置文件
public class SpringConfiguration {
}
